x86/HVM: introduce hvm_get_cpl() and respective hook
authorJan Beulich <jbeulich@suse.com>
Thu, 15 Dec 2016 10:07:55 +0000 (11:07 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 15 Dec 2016 10:07:55 +0000 (11:07 +0100)
commitaac1df3d03592fba5aadfcf2f496000285bab336
treeac896ffaba51072d6a0117c8cf1770297585468b
parentca01e5821245ff547fecdf091c29f45e5aba58cf
x86/HVM: introduce hvm_get_cpl() and respective hook

... instead of repeating the same code in various places (and getting
it  wrong in some of them).

In vmx_inst_check_privilege() also stop open coding
vmx_guest_x86_mode().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/monitor.c
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/hvm/vmx/vvmx.c
xen/arch/x86/mm/guest_walk.c
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/oprofile/xenoprof.c
xen/include/asm-x86/hvm/hvm.h
xen/include/asm-x86/hvm/vmx/vmx.h